#include"comm.hpp"

int main()
{
    //1.打开管道文件
    int fd = open(IpcPath.c_str(),O_WRONLY);
    if(fd < 0)
    {
        perror("open fail");
        exit(1);
    }

    //2.ipc过程
    string buffer;
    while(true)
    {
        cout<<"Please Enter Message line:>";
        std::getline(cin,buffer);
        write(fd,buffer.c_str(),buffer.size());
    }

    //3.关闭文件描述符
    close(fd);
    return 0;
}